<%--
/**
 * Licensed to Open-Ones Group under one or more contributor license
 * agreements. See the NOTICE file distributed with this work
 * for additional information regarding copyright ownership.
 * Open-Ones Group licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a
 * copy of the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Product - Add</title>
</head>
<body>
<form name="frmProduct" action="AddProduct.do" method="POST">
        
   <table border="0" width="675px" id="myTable" cellspacing="0" cellpadding="3px">
                <!--  Display error if any -->
        <c:if test="${not empty errors}">
          <tr>
            <td colspan="2">
                <b><font color="red">
                  <c:forEach var="errMsg" items="${errors}">
                    ${errMsg}<br/>
                  </c:forEach>
                </font></b>
            </td>
          </tr>
        </c:if>
        
        <%-- Display information message --%>
        <c:if test="${not empty message}">
          <tr>
            <td colspan="2">
                <b><font color="blue">
                    ${message}
                </font></b>
            </td>
          </tr>
        </c:if>
        
        <tr>
            <td id="textAreaLabel"><b>Product name(*):</b>
            <td align="left">
                <input name="name" type="text" value="${form.name}">
            </td>   
        </tr>   
        <tr>
            <td id="textAreaLabel"><b>Description:</b></td>
            <td align="left">
                <textarea class="myTextArea" style="text-align:left;" rows="5" name="desc">${form.desc}</textarea>
            </td>
        </tr>
        <tr>
            <td id="textAreaLabel"><b>Images/Videos:</b></td>
            <td align="left">
                <input type="file" name="media"/>
                <a href="#" class="myLink"><u>Add more file</u></a>
            </td>
        </tr>
        <tr>
            <td id="textAreaLabel"><b>Features:</b></td>
            <td align="left">
                <textarea class="myTextArea" style="text-align:left;" rows="5" name="feature">${form.feature}</textarea>
            </td>
        </tr>
        <tr>
            <td id="textAreaLabel"><b>System requirements:</b></td>
            <td align="left">
                <table class="dashedTable">
                    <tr>
                        <td width="60%">Operating Systems</td>
                        <td width="40%">
                            <select style="width:250px;" size="3" name="os" multiple="multiple">
                                <option value="win_2k">Windows 2000/ME</option>
                                <option value="win_xp" selected="selected">Windows XP</option>
                                <option value="win_vista">Windows Vista</option>
                                <option value="win_7">Windows 7</option>
                                <option value="linux">Linux</option>
                                <option value="independent">Independent</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td width="60%">RAM <font color="gray">(in Megabytes)</font></td>
                        <td width="40%"><input type="text" name="ram" style="width:250px" value="${form.ram}"/></td>
                    </tr>
                    <tr>
                        <td width="60%">CPU <font color="gray">(Ex: Core i5 2.4 Ghz)</font></td>
                        <td width="40%"><input type="text" name="cpu" style="width:250px" value="${form.cpu}"/></td>
                    </tr>
                    <tr>
                        <td width="60%">Disk space <font color="gray">(in Megabytes)</font></td>
                        <td width="40%"><input type="text" name="diskSpace" style="width:250px" value="${form.diskSpace}"/></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td id="textAreaLabel"><b>Link to download:</b></td>
            <td align="left">
                <input type="text" name="linkDownload" style="width:500px" value="${form.linkDownload}"></input>
            </td>
        </tr>
        <tr>
            <td id="textAreaLabel"><b>Developer teams:</b></td>
            <td align="left">
                <textarea class="myTextArea" style="text-align:left;" rows="5" name="devTeam">${form.devTeam}</textarea>
            </td>
        </tr>
        <tr>
            <td id="textAreaLabel"></td>
            <td align="left">
                <input type="submit" name="cmd" value="Add">
                <input type="submit" name="cmd" value="Back">
            </td>
        </tr>
  </table>
</form>
</body>
</html>